﻿<ValidateForm OnValidSubmit="OnSaveCleint" Model="Value">
    <div class="row g-3 form-inline">
        <div class="col-6 col-sm-6">
            <BootstrapInput @bind-Value="Value.AppID" placeholder="不可为空，50字以内" Readonly="Value.AppID != null" ValidateRules="@Validators" />
        </div>
        <div class="col-6 col-sm-6">
            <BootstrapInput @bind-Value="Value.AppName" placeholder="不可为空，50字以内" Readonly="Value.AppName != null" />
        </div>
        <div class="col-12 col-sm-12">
            <BootstrapInput @bind-Value="Value.Title" placeholder="不可为空，50字以内" />
        </div>
        <div class="col-12 col-sm-12">
            <BootstrapInput @bind-Value="Value.Footer" placeholder="不可为空，50字以内" />
        </div>
        <div class="col-12 col-sm-12">
            <BootstrapInput @bind-Value="Value.HomeUrl" placeholder="不可为空，50字以内" />
        </div>
        <div class="col-12 col-sm-12">
            <BootstrapInput @bind-Value="Value.ProfileUrl" placeholder="不可为空，50字以内" />
        </div>
        <div class="col-12 col-sm-12">
            <BootstrapInput @bind-Value="Value.SettingsUrl" placeholder="不可为空，50字以内" />
        </div>
        <div class="col-12 col-sm-12">
            <BootstrapInput @bind-Value="Value.NotificationUrl" placeholder="不可为空，50字以内" />
        </div>
        <div class="col-12 col-sm-12">
            <BootstrapInputGroup>
                <BootstrapInputGroupLabel DisplayText="网站图标" />
                <BootstrapInput @bind-Value="Value.Icon" placeholder="不可为空，2000字以内" />
                <BootstrapInputGroupLabel DisplayText="Favicon" />
                <BootstrapInput @bind-Value="Value.Favicon" placeholder="不可为空，2000字以内" />
            </BootstrapInputGroup>
        </div>
        <div class="col-12 col-sm-12">
            <BootstrapInputGroup>
                <BootstrapInputGroupLabel DisplayText="Jwt Token失效日期" />
                <DateTimePicker @bind-Value="Value.ExpiredDate" IsDisabled=@SwitchIsOpen />
                <Toggle Color=Color.Primary OffText="开启永久有效" OnText="关闭永久有效" @bind-Value="SwitchIsOpen" OnValueChanged=OnSwitchValueChanged />
            </BootstrapInputGroup>
        </div>
    </div>
    <div class="form-footer">
        <Button ButtonType="ButtonType.Button" Text="关闭" Icon="fa-solid fa-close" Color="Color.Secondary" OnClick="OnClickClose"></Button>
        <Button ButtonType="ButtonType.Submit" Text="保存" Icon="fa-solid fa-save"></Button>
    </div>
</ValidateForm>
